import type { RouteRecordRaw } from 'vue-router';
import RouterView from '@/layout/routerView/index.vue';

const moduleName = 'administrative';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/administrative',
    redirect: { name: `/${moduleName}-strative` },
    component: RouterView,
    meta: {
      title: '行政许可',
      icon: 'icon-zhuomian',
      hideInMenu: true,
    },
    children: [
      {
        path: 'saveStrative',
        name: `${moduleName}-saveStrative`,
        meta: {
          title: '新增任务',
          hideInMenu: true,
          activeMenu: `${moduleName}-strative`,
        },
        component: () => import('@/views/administrative/saveStrative/index.vue'),
      },
      {
        path: 'taskView',
        name: `${moduleName}-taskView`,
        meta: {
          title: '查看任务',
          hideInMenu: true,
          activeMenu: `${moduleName}-strative`,
        },
        component: () => import('@/views/administrative/taskView/index.vue'),
      },
      {
        path: 'dispose',
        name: `${moduleName}-dispose`,
        meta: {
          title: '处理',
          hideInMenu: true,
          activeMenu: `${moduleName}-strative`,
        },
        component: () => import('@/views/administrative/dispose/index.vue'),
      },
      {
        path: 'accraditation',
        name: `${moduleName}-approve-accraditation`,
        meta: {
          title: '审批',
          hideInMenu: true,
          activeMenu: `${moduleName}-approve`,
        },
        component: () => import('@/views/administrative/approve/accraditation/index.vue'),
      },
      {
        path: 'approveView',
        name: `${moduleName}-approve-approveView`,
        meta: {
          title: '查看审批',
          hideInMenu: true,
          activeMenu: `${moduleName}-approve`,
        },
        component: () => import('@/views/administrative/approve/approveView/index.vue'),
      },
    ],
  },
];

export default routes;
